#!/bin/bash
# whatsthis.sh
#
# Tells you what the files in the specified directory are

if [ -z $1 ]; then
	echo "Usage: $0 <DIRECTORY>"
	exit 1
fi

# Checks wheter the parameter passed is a directory
if [ -d $1 ]; then
	echo "$1 is not a directory!"
	exit 1
fi

DIRECTORY=$1

# Prints info about each file in the DIRECTORY
for file in $DIRECTORY/*
do
  whatis `basename $file`
done

exit 0
